package com.xiye.common.util.mail;

import javax.mail.*;

/**
 * @author 西野
 * @version V1.0
 * @title MyAuthenticator.java
 * @package com.xiye.common.util.mail
 * @description 发送邮件需要使用的基本信息
 * @date 2018-07-21
 */
public class MyAuthenticator extends Authenticator {
    String userName = null;
    String password = null;

    public MyAuthenticator() {
    }

    public MyAuthenticator(String username, String password) {
        this.userName = username;
        this.password = password;
    }

    protected PasswordAuthentication getPasswordAuthentication() {
        return new PasswordAuthentication(userName, password);
    }
}
